/**
 * 住房通
 */

import https from './index.js' 

// /api/contract/SignRoomAdd?SignType=类型&Userid=建立人的userid&RooName=签约室名称
export function createSignRoom(data) {
	return https({
		url: '/api/contract/SignRoomAdd',
		method: 'GET',
		data
	})
}

// /api/contract/SignRoomGetList?SignType=类型&Userid=&Status=&StartDate=&EndDate=&RoomName=&Page=页数&Size=每页条数
export function reqSignRoomList(data) {
	return https({
		url: '/api/contract/SignRoomGetList',
		method: 'GET',
		disabledLoading: true,
		data
	})
}

// values=社会统一信用代码/名称（模糊查询）
export function searchEnterprise(data) {
	return https({
		url: '/api/personinfo/GetEnterprisesForEnterpriseId',
		method: 'GET',
		data
	})
}

// identityNo=权利人证件号码&certificateNo=权证号
export function getHouseInfo(data, disabledLoading = true) {
	return https({
		url: '/api/houseinfo/GetHouseInfo',
		method: 'GET',
		data,
		disabledLoading
		
	})
}

// RoomId=签约室ID&Userid=添加人&IdentityType=人员类型
export function addSignRoomPeople(data) {
	return https({
		url: '/api/contract/SignRoomAddPeople',
		method: 'GET',
		data
	})
}

// RoomId=签约室ID&Userid=删除的人
export function deleteSignRoomPeople(data) {
	return https({
		url: '/api/contract/SignRoomDeletePeople',
		method: 'GET',
		data
	})
}


// 	获取签约室详细信息	Get	/api/contract/SignRoomGetInfo	RoomId=签约室ID

export function getSignRoomInfo(data) {
	return https({
		url: '/api/contract/SignRoomGetInfo',
		method: 'GET',
		data,
		disabledLoading: true
	})
}


// 	签约室添加房屋	Get	/api/contract/SignRoomAddHouse	RoomId=签约室ID&Userid=房屋所有人&HouseId=房屋编号
// 筑房通一次只会有一套房，如果原先有房，调用此接口会将原来房屋删除

export function signRoomAddHouse(data) {
	return https({
		url: '/api/contract/SignRoomAddHouse',
		method: 'GET',
		data
	})
}

// 	删除签约室房屋	Get	/api/contract/SignRoomDeleteHouse RoomId=签约室ID&HouseId=房屋编号	
export function deleteSignRoomHouse(data) {
	return https({
		url: '/api/contract/SignRoomDeleteHouse',
		method: 'GET',
		data
	})
}

/**
 * 变更签约室状态	Get	/api/contract/SignRoomUpdateStatus	RoomId=签约室ID&Status=签约室状态	
 * 0终止、1正常、2完成(网签结束)
 */
export function updateSignRoomStatus(data) {
	return https({
		url: '/api/contract/SignRoomUpdateStatus',
		method: 'GET',
		data
	})
}

// 添加合同
// api/contract/SignRoomZFTAddContract
export function addSignRoomContract(data) {
	return https({
		url: '/api/contract/SignRoomZFTAddContract',
		method: 'POST',
		data,
		header: {
			"Content-Type": "application/json; charset=utf-8"
		}
	})
}

